package library.controller;

class book {
    private String name; //书名
    private String author; //作者
    public double price;  //价格
    private String category; //分类
    private boolean state; //状态 借出——true  未借出—false

    //通过构造函数给出书的属性
    public book(String name, String author, double price, String category, boolean state) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.category = category;
        this.state = state;
    }

    public  book() {//默认10本书
        this(10);
    }

    public book(int i) {
        // TODO Auto-generated constructor stub
        Person.books = new book[i];
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public boolean isState() {
        return state;
    }

    public void setState(boolean state) {
        this.state = state;
    }

}
